﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Demos.util;
using mendian;
using Luna小店.DTO;
using Luna小店.UC.面料库存.库存记录.service;
using Luna小店.UC.面料库存.入库.service;

namespace Luna小店.UC.面料库存
{
    public partial class Frm新增面料期初 : DevExpress.XtraEditors.XtraForm
    {
        public Frm新增面料期初()
        {
            InitializeComponent();
        }

        private void simpleButton提交_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(this.textEdit面料号.Text) || String.IsNullOrEmpty(this.textEdit描述名称.Text))
            {
                MessageBox.Show("面料号和描述名称不能为空");
                return;
            }
            DTO面料库存 DTO面料库存 = new DTO面料库存(
                this.textEdit供货商.Text
                ,this.textEdit面料号.Text
                ,this.textEdit描述名称.Text
                ,this.textEdit成分.Text
                ,this.textEdit纱织密度.Text
                ,this.textEdit克重.Text
                ,this.textEdit幅宽.Text
                ,this.textEdit厚度.Text
                ,this.textEdit弹力.Text
                ,this.textEdit面料特性注意.Text
                ,this.textEdit延续性.Text
                ,this.textEdit用途.Text
                ,this.textEdit验料结果.Text
                ,this.textEdit颜色.Text
                ,this.textEdit季节.Text
                ,this.textEdit风格.Text
                ,this.textEdit整理方式.Text
                );
            //webservice传值
            入库Service.post新增面料(DTO面料库存);
            this.Close();
        }
    }
}